<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <menu-age :title-age='12' title="14" :parr='parr' :arr='arr'></menu-age>
  </div>
  <script src="../vue.js"></script>
  <script>
    Vue.component('menuAge', {
      props: ['titleAge', 'title', 'parr', 'arr'],
      data: function () {
        return {
          name: 'jerry'
        }
      },
      template: `
        <div>
          <p>{{ title + 12}}</p>
          <p>{{ titleAge + 12 }}</p>
          <div>
            <p v-for='(item,index) in parr' :key='index'>{{item}}</p>
          </div>
          <p>{{arr.name}}</p>
          <p>{{arr.age}}</p>
        </div>
      `
    })


    var vm = new Vue({
      el: '#app',
      data: {
        arr: {
          name: 'sipaike1',
          age: 35
        },
        parr: ['tom', 'jerry', 'pake']
      },
    })
  </script>
</body>

</html>